package com.lmabbe.tenant.service.impls;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lmabbe.tenant.mapper.TenantDatabasesMapper;
import com.lmabbe.tenant.objects.entity.TenantDatabases;
import com.lmabbe.tenant.service.TenantDatabasesService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lmabbe
 * @data 2021/3/13 17:41
 */
@Service
public class TenantDatabasesServiceImpl extends ServiceImpl<TenantDatabasesMapper, TenantDatabases>
        implements TenantDatabasesService {

    @Override
    public List<TenantDatabases> findTenantAllDatabases(String tenantId) {
        return baseMapper.selectList(baseMapper.createQueryWrapper().eq(TenantDatabases::getTenantId, tenantId));
    }
}
